package com.qiyun.dinghuohui.utils;

import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.AnimationSet;
import android.view.animation.LayoutAnimationController;
import android.view.animation.TranslateAnimation;

public class QiYunAnimationUtils {
	public static void setMenuLayoutAnimation(ViewGroup view) {
		AnimationSet as = new AnimationSet(true);
		AlphaAnimation alpha = new AlphaAnimation(0.0F, 1.0F);
		as.setDuration(50L);
		as.addAnimation(alpha);
		TranslateAnimation translate = new TranslateAnimation(1, 1, 1, 0, 1, 0,
				1, 0);
		translate.setDuration(250L);
		as.addAnimation(translate);
		LayoutAnimationController controller = new LayoutAnimationController(
				as, 0.5f);
		view.setLayoutAnimation(controller);
	}
}
